package com.demo2;

import com.demo2.controller.Modify;
import com.demo2.controller.Read;
import com.demo2.controller.StudentController;
import com.demo2.model.Student;
import com.demo2.service.StudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App2 {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");

        Modify modify = context.getBean("modify", Modify.class);
        modify.modifyStudent();
        Read read = context.getBean("read", Read.class);
        System.out.println(read.readStudent());
    }
}
